//---------------------------------------------------------------------------

#ifndef SPR_OBMENH
#define SPR_OBMENH
//---------------------------------------------------------------------------
#include <Classes.hpp>
#include <Controls.hpp>
#include <StdCtrls.hpp>
#include <Forms.hpp>
#include <ExtCtrls.hpp>
#include "cxClasses.hpp"
#include "cxControls.hpp"
#include "cxCustomData.hpp"
#include "cxData.hpp"
#include "cxDataStorage.hpp"
#include "cxDBData.hpp"
#include "cxEdit.hpp"
#include "cxFilter.hpp"
#include "cxGraphics.hpp"
#include "cxGrid.hpp"
#include "cxGridCustomTableView.hpp"
#include "cxGridCustomView.hpp"
#include "cxGridDBTableView.hpp"
#include "cxGridLevel.hpp"
#include "cxGridTableView.hpp"
#include "cxLookAndFeelPainters.hpp"
#include "cxLookAndFeels.hpp"
#include "cxStyles.hpp"
#include <DB.hpp>
#include <ActnList.hpp>
#include "cxButtons.hpp"
#include "cxContainer.hpp"
#include "cxGroupBox.hpp"
#include <DBCtrls.hpp>
#include <Menus.hpp>
#include "cxCalendar.hpp"
#include "cxDropDownEdit.hpp"
#include "cxMaskEdit.hpp"
#include "cxTextEdit.hpp"
#include "DBAccess.hpp"
#include "IBC.hpp"
#include "MemDS.hpp"
//---------------------------------------------------------------------------
class TfrSPR_OBMEN : public TForm
{
__published:	// IDE-managed Components
	TPanel *pTable;
	TPanel *pEdit;
	TPanel *pUPR;
	TcxGrid *sgSP_OBMEN;
	TcxGridDBTableView *sgSP_OBMENDBTableView1;
	TcxGridLevel *sgSP_OBMENLevel1;
	TcxGridDBColumn *MODEL;
	TcxGridDBColumn *ZAV_NOM;
	TcxGridDBColumn *ISPOLN;
	TcxGridDBColumn *DAT_IZGOT;
	TcxGridDBColumn *POK_UST;
	TcxGridDBColumn *NATH_POV;
	TcxGridDBColumn *KON_POV;
	TcxGridDBColumn *MARKA;
	TcxGridDBColumn *POK_NOW;
	TcxGridDBColumn *cxgrdbclmnKOD_OPERATORA;
	TcxGridDBColumn *DAT_WOD;
	TcxGridDBColumn *STATUS;
	TcxGridDBColumn *PROIZV;
	TcxGridDBColumn *RAZRJD;
	TActionList *ActionList1;
	TAction *ESC;
	TcxButton *btADD;
	TcxButton *btDEL;
	TcxButton *btSAVE;
	TAction *ADD;
	TAction *DEL;
	TAction *SAVE;
	TcxGroupBox *gbEdit;
	TLabel *Label6;
	TLabel *Label1;
	TDBLookupComboBox *cbMARKA;
	TDBLookupComboBox *cbMODEL;
	TLabel *Label2;
	TDBLookupComboBox *cbISPOLN;
	TLabel *Label3;
	TEdit *edZAV_NOM;
	TLabel *Label4;
	TEdit *edPOK_NATH;
	TLabel *Label5;
	TcxDateEdit *dtpDAT_IZG;
	TLabel *Label7;
	TLabel *Label8;
	TEdit *edTEK_POK;
	TcxGroupBox *gbDOP;
	TLabel *Label9;
	TLabel *Label10;
	TcxDateEdit *dtpDAT_NATH;
	TcxDateEdit *dtpDAT_KON;
	TLabel *Label11;
	TRadioButton *rbPLUS;
	TRadioButton *rbMIN;
	TcxGridDBColumn *NOM_ABON;
	TLabel *Label12;
	TEdit *edNOM;
	TIBCQuery *dsetSP_OBMEN;
	TIBCQuery *dsetPROV_KOL;
	TIBCQuery *dsetPROV_KOL_OBM;
	TIBCQuery *dsetPROV_KOL_ISP;
	TIBCQuery *dsetFIO_ABON_PO_SCH;
	TIBCDataSource *dsSP_OBMEN;
	TIBCDataSource *dsPROV_KOL;
	TIBCDataSource *dsPROV_KOL_OBM;
	TIBCDataSource *dsPROV_KOL_ISP;
	TIBCDataSource *dsFIO_ABON_PO_SCH;
	void __fastcall ESCExecute(TObject *Sender);
	void __fastcall FormShow(TObject *Sender);
	void __fastcall ADDExecute(TObject *Sender);
	void __fastcall cbMARKAClick(TObject *Sender);
	void __fastcall sgSP_OBMENDBTableView1DblClick(TObject *Sender);
	void __fastcall cbMODELClick(TObject *Sender);
	void __fastcall cbISPOLNClick(TObject *Sender);
	void __fastcall edZAV_NOMKeyDown(TObject *Sender, WORD &Key,
          TShiftState Shift);
	void __fastcall edPOK_NATHKeyDown(TObject *Sender, WORD &Key,
          TShiftState Shift);
	void __fastcall SAVEExecute(TObject *Sender);
	void __fastcall dtpDAT_IZGKeyDown(TObject *Sender, WORD &Key,
          TShiftState Shift);
	void __fastcall DELExecute(TObject *Sender);
	void __fastcall FormClose(TObject *Sender, TCloseAction &Action);
	void __fastcall edTEK_POKKeyDown(TObject *Sender, WORD &Key,
          TShiftState Shift);
private:	// User declarations
public:		// User declarations
int KOD_SCH,Stat,REDAKT;
	__fastcall TfrSPR_OBMEN(TComponent* Owner);
 void __fastcall TfrSPR_OBMEN::Obnovi();
 int __fastcall TfrSPR_OBMEN::PROV_KOL_PO_ABON(int KOD_SCH,String ZAV_NOM);
 int __fastcall TfrSPR_OBMEN::PROV_KOL_OBM_SCH(int KOD_SCH,String ZAV_NOM);
 };
//---------------------------------------------------------------------------
extern PACKAGE TfrSPR_OBMEN *frSPR_OBMEN;
//---------------------------------------------------------------------------
#endif
